Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stale bot for locked issues #26711

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Fix stale bot for locked issues #26711

merged 1 commit into from
Oct 11, 2023

Conversation

LysandreJik
Copy link
Member

The stalebot has crashed once again due to the following error:

Traceback (most recent call last):
  File "scripts/stale.py", line 67, in <module>
    main()
  File "scripts/stale.py", line 57, in main
    issue.create_comment(
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Issue.py", line 290, in create_comment
    headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/comments", input=post_parameters)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Requester.py", line 494, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Requester.py", line 629, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Requester.py", line 726, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Requester.py", line 760, in __requestRaw
    response = cnx.getresponse()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/Requester.py", line 174, in getresponse
    r = verb(
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/urllib3/connectionpool.py", line 931, in urlopen
    retries = retries.increment(method, url, response=response, _pool=self)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/github/GithubRetry.py", line 179, in increment
    raise Requester.createException(response.status, response.headers, content)  # type: ignore
github.GithubException.GithubException: 403 {"message": "Unable to create comment because issue is locked.", "documentation_url": "https://docs.github.com/articles/locking-conversations/"}

I believe it's the first time it's encountering a locked issue, hence the failure. I tested locally that it ran fine on this specific issue.

@LysandreJik LysandreJik requested a review from ydshieh October 10, 2023 08:41
Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The bot needs a lot of human help 😅

Is there only one (or just a few) issue(s) causing problem?

@LysandreJik
Copy link
Member Author

Just the locked issues, I believe there's a single one here but unsure

@LysandreJik LysandreJik merged commit 6ecb2ab into main Oct 11, 2023
3 checks passed
@LysandreJik LysandreJik deleted the fix-stalebot branch October 11, 2023 14:08
helboukkouri pushed a commit to helboukkouri/transformers that referenced this pull request Oct 16, 2023
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants